package com.lw.alarm.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lw.alarm.model.AlarmServer;
import com.lw.alarm.service.AlarmServerServiceI;
import com.lw.common.basemodel.EasyuiModel;
import com.lw.common.core.service.BaseServiceI;
import com.lw.common.util.ModelConvertUtil;
import com.lw.common.web.controller.BaseController;

@RestController
@RequestMapping("/alarmServer")
public class AlarmServerController extends BaseController<AlarmServer, Integer> {
	@Resource
	private AlarmServerServiceI alarmServerService;

	@Override
	public BaseServiceI<AlarmServer, Integer> getBaseService() {
		return alarmServerService;
	}

	@GetMapping("list")
	public EasyuiModel<AlarmServer> findUserAndRolesByPage(AlarmServer r, int page, int rows) {
		return ModelConvertUtil.pageInfo2EasyuiModel(alarmServerService.findAlarmServerByPage(r, page, rows));
	}
}
